package com.five.monkey.feign.es.dao.repository;

import com.five.monkey.feign.es.dao.model.Card;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * @author 狻猊
 * @date 2022-03-29 14:39:27
 */
public interface CardRepository extends ElasticsearchRepository<Card, Long> {

    List<Card> findByContentMatches(String content);

    Page<Card> findByContentMatches(String content, Pageable pageable);

    List<Card> findByStatusGreaterThanEqual(int status);

    List<Card> findByAdminId(Long adminId);

    List<Card> findByTitleContains(String title);

    List<Card> findByTitle(String title);
}
